home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / tex / do30.zip / DO.DOC < prev    next >
Text File  |  1987-10-08  |  25KB  |  475 lines

  1. ┌-DO (v3) $10 TO LARRIE HUTTON 701 WARREN ST, MARIETTA, OH 45750 614-374-8337-┐
  2. │ (s) Strip LF to CR/LF or (x)-out LFs.  (p) Paragraph or (o)ne-line lines.   │
  3. │ (w) WordStar from ASCII.               (h) High bits out [WS to ASCII].     │
  4. │ (u) Upper or (l)ower case only.        (q) Quicksort [2048 lins / 127 chr]. │
  5. │ (n) Number lines; no trailing spaces.  (b) Bomb repeated & blank lines.     │
  6. │ (e) Expand tabs with spaces.           (t) Tag lines within range.          │
  7. │ (c) Copy lines between two columns.    (i) Insert, at column, a string.     │
  8. │ (f) Find or (r)eplace string.          (a) Ask before replacing.            │
  9. │ (j) Join or (m)erge-alpha two files.   (g) Glue two files side by side.     │
  10. │ (k) Change all letters but 1st to low. (d) Makes "Tom Mix,OH" "Mix,Tom,OH"  │
  11. ├-----------------------------------------------------------------------------┤
  12. │ NOTES on find, replace, and ask:  Upper case (F,R,A) causes commands to     │
  13. │ ignore case.  ASCII values entered with #nnn#; eg, #13##10# is CR/LF.       │
  14. ├-----------------------------------------------------------------------------┤
  15. │ COMMAND LINE EXAMPLES (where: i=input  l=line  c=col  s=string  #n#=ascii)  │
  16. ├-----------------------------------------------------------------------------┤
  17. │ do s i           do p d:\dir\i        do w i > d:\dir\o do h i              │
  18. │ do u i           do q con: c c s      do n i > prn      do b con: > prn     │
  19. │ do e i c         do t i +/-l +/-l     do c i c c        do i i c s s s      │
  20. │ do r i s // s    do a i s#n#s // s    do j i i +/-l     do g i i            │
  21. ├-----------------------------------------------------------------------------┤
  22. │Choose from above (or "?" for cmnd ln sntx, "+" for 9 lns, "-" for 4 lns):   │
  23. │                                                                             │
  24. │                                                                             │
  25. └-----------------------------------------------------------------------------┘
  26.                                 D O . D O C
  27.                                      
  28.                              Larrie V. Hutton
  29.                              701 Warren Street
  30.                             Marietta, OH 45750
  31.                               (614) 374-8337
  32.                                      
  33. This is admittedly pretty sparse documentation for a fairly complicated
  34. program--the DO text file manipulator.  I had hoped the program screen
  35. would be self-explanatory.  It wasn't, so here goes.  The manual enclosed
  36. here (to use the term loosely) is divided into three small sections: [1] a
  37. BRIEF description of most of the less obvious commands, [2] a section
  38. providing some details of the screen and command line formats with a few
  39. sample batch file suggestions, and [3] a listing of the comments in the
  40. source code.  The latter is included because some of you may find it
  41. helpful to see the internal documentation, but I am not going to elaborate
  42. (I have a job!).  Incidentally, the last section was produced easily by
  43. using DO to search for all lines with an asterisk.
  44.  
  45.  
  46. INDIVIDUAL COMMANDS
  47.  
  48.      (s)  Strips LF's (ASCII 10) or CR's (ASCII 13) and replaces them with
  49.           a CR/LF combination.  Useful for files that overwrite lines (have
  50.           only CR's) or begin just below the end of the previous line (have
  51.           only LF's).
  52.  
  53.      (x)  Rubs out LF's and leaves only CR's.  Useful for uploading to UNIX
  54.           editors, for example, that count both CR's and LF's as valid line
  55.           terminators.  Without this ability, files are often double spaced
  56.           when they should not be.
  57.  
  58.      (p)  Paragraphs are formed from single lines by replacing CR/LF
  59.           combinations with spaces; joins consecutive lines.  Good for
  60.           putting ASCII text into form suitable for most word processors.
  61.           A CR/LF combination IS issued, however, for blank lines--in fact,
  62.           two CR/LF combinations are issued at blank lines to preserve the
  63.           "original intent".
  64.  
  65.      (o)  One-lines paragraphs--the previous command in reverse.  Useful
  66.           for taking long text strings and turning them into proper ASCII
  67.           format.  Lines are formed at the next word break whenever the
  68.           number of characters exceeds 60.
  69.  
  70.      (w)  WordStar from ASCII.  Not perfect, but does a pretty good job at
  71.           guessing, and much easier than hand-editing an ASCII file from
  72.           scratch.
  73.  
  74.      (h)  Reverse of the previous, but much easier to implement.  Simply
  75.           replaces all high bits with low, so produces proper ASCII text.
  76.           Useful for peeking at a WS file.
  77.  
  78.      (u)  Upper case text only produced.
  79.  
  80.      (l)  Lower case text only produced.
  81.  
  82.      (q)  Really a merge sort for text, and a shell sort for numbers.  Very
  83.           fast and flexible.  Maximum number of lines shows on screen;
  84.           since routine uses the heap, the maximum file size is dependent
  85.           upon available RAM.
  86.  
  87.      (n)  Numbers lines (default is to use first eight columns for this
  88.           information).  Also removes trailing blanks from all lines.
  89.           Sometimes the latter function is really what is needed; in that
  90.           case, number the lines and copy only from the ninth column and
  91.           beyond with the (c) option.  Blank lines are counted, but the
  92.           numbers aren't printed.
  93.  
  94.      (b)  Bombs (deletes) all blank lines and duplicate lines.  Sometimes
  95.           useful after sorting.
  96.  
  97.      (e)  Expands tabs with tabs.  Default is eight spaces.
  98.  
  99.      (t)  Tags lines: Lets you copy lines 37-94 only, for example.
  100.           Entering -5 to -1 would produce the LAST 5 lines.
  101.  
  102.      (c)  Copies only text that falls within the specified columns.  If the
  103.           end column is not specified, assumes to end.  If end column is
  104.           negative, pads with spaces if necessary to assure that all lines
  105.           are same length.
  106.  
  107.      (i)  Inserts a string at any given column position.  Could be used,
  108.           for example, to widen borders.  If a CR/LF is inserted (with
  109.           #13##10#), causes lines to be split at that point into two lines.
  110.  
  111.      (f)  Finds strings in text.  Again, can look for any ASCII string by
  112.           using #n# combinations.  Upper case F causes case to be ignored.
  113.  
  114.      (r)  Similar, but replaces all instances of one string with another.
  115.           Can also be used to produce output that has only lines containing
  116.           the string, or all lines NOT containing the string (by using
  117.           "????" or "!!!!" as the replacement string.  On the command line,
  118.           a double slash (//), with a space on each side, should separate
  119.           the old and new strings.  Again, ASCII values can be entered
  120.           directly.  An R causes case to be ignored.
  121.  
  122.      (a)  Asks before replacing.  Lets you see the line with and without
  123.           the replacement before you decide.
  124.  
  125.      (j)  Joins two files by letting you insert the second file at any line
  126.           in the first.
  127.  
  128.      (m)  Merges two files alphabetically.  In other words, if you have two
  129.           sorted files, this will create a single sorted file.  Since there
  130.           is no limit on file size, this would permit files too large to be
  131.           (q)uick sorted to be split into two (or many) files, sorted with
  132.           (q), and then merged.
  133.  
  134.      (g)  Glues two files side-by-side.  Most useful if the first file has
  135.           been padded with spaces to a consistent line length with the (c)
  136.           command.
  137.  
  138.      (k)  Change all letters but first letter in word to lower case; first
  139.           letter is capitalized.  Two common uses would be to take a
  140.           mailing list with all caps and turn it into a more respectable-
  141.           looking file, or to clean up inconsistently formatted source
  142.           code.
  143.  
  144.      (d)  Takes the last word in the first field of a comma-delimited data
  145.           file and creates a new, first field.  For example, mailing lists
  146.           that don't separate the last and first names with a comma (and
  147.           t